<?php
include('config.php');

$where = "1";
//如果有搜索
$name = isset($_GET['c_name']) ? trim($_GET['c_name']) : '';
$number = isset($_GET['number']) ? trim($_GET['number']) : '';
$info = isset($_GET['info']) ? trim($_GET['info']) : '';
$cqname = isset($_GET['cq_name']) ? trim($_GET['cq_name']) : '';
if($cqname){
	$where .= " and `guest_name` LIKE  '%{$cqname}%'";
}
//先查询数量
$num = $mysql->selectCount('guest',$where);
//查询列表
$pb_page=new Page($num,$onepage,8);
$result = $mysql->selectList('guest',$where,'guest_id desc',$pb_page->limit());
//查询屏蔽客户

$smarty->assign('link', 5);
$smarty->assign('result',$result);
$smarty->assign('page',$pb_page->show(1));
$smarty->display('customer.html');